(1) Field of the Invention
The present invention relates to a traffic shaper and a bandwidth controller for controlling the bandwidth of a received variable-length packet and, more particularly, to a traffic shaper and a bandwidth controller for a variable-length packet, for transmitting a received packet temporarily stored in a buffer memory to an output circuit in conformity with a minimum guaranteed bandwidth preliminarily designated, by a bandwidth control using a leaky bucket.
(2) Description of the Related Art
In association with increase in the number of Internet users, the traffic amount in a communication network is sharply increasing. The current Internet communication is performed in the best effort fashion in which an information transfer amount of each user is determined in accordance with an unoccupied state of a line. However, when broadband lines such as FTTH (Fiber To The Home) are spread to houses and communication service of a large transfer information amount such as video streaming service increases, communication service which guarantees the minimum bandwidth to each user becomes necessary.
In traffic on the Internet, different from conventional voice traffic in a public network, burst transmission data is generated from a user terminal and a packet flow (traffic) becomes discontinuous. Consequently, it is unnecessary to always assure a fixed line bandwidth to each user prior to communication. To effectively use the bandwidth of a communication line, it is desired to multiplex traffic of a plurality of users on a single communication line and perform a communication control of guaranteeing the minimum guaranteed bandwidth within the range of a maximum allowable bandwidth preliminarily contracted for each user on traffic actually generated. The minimum guaranteed bandwidth and the maximum allowable bandwidth correspond to the minimum cell rate (MCR) and the peak cell rate (PCR) in the asynchronous transfer mode (ATM).
In this case, the minimum guaranteed bandwidth can be assigned, for example, so that the whole bandwidth of a communication line is shared by plural user traffic multiplexed on the communication line. In the Internet in which communication is performed basically in the best effort fashion, it is not always necessary to set the maximum allowable bandwidth for each user. It is however desired to perform a bandwidth control such that, when the traffic volume of any of the users becomes below the minimum guaranteed bandwidth, the unoccupied bandwidth left in a communication lien can be fairly shared by users each having a traffic volume equal to or larger than the minimum guaranteed bandwidth.
As a conventional technique regarding the traffic shaper function of performing the above-described bandwidth control, for example, Japanese Unexamined Patent Publication No. 2001-168869 (prior art 1) discloses a bandwidth control method for an ATM network for controlling the MCR and PCR by applying a weighted round robin (WRR) method.
Japanese Unexamined Patent Publication No. 2-239748 (prior art 2) discloses a bandwidth control technique for ATM cells, using a leaky bucket. In the prior art 2, a counter is provided for each transfer channel. When a cell arrives at a queue, a value corresponding to the length of the arrived cell is added to the counter, and a value proportional to time elapsed from the arrival time of the immediately preceding cell is subtracted from the count value of the counter. In each counter, one threshold value is set. The cell transmission right is granted to a cell queue of a transmission channel whose count value becomes smaller than the threshold.
As an example of the traffic shaping technique for a variable-length packet, Japanese Unexamined Patent Publication No. 2000-332787 (prior art 3) discloses a packet transfer apparatus in which a high priority queue for storing packets for which the bandwidth has to be guaranteed and a non-priority queue for storing packets to be transmitted in an unoccupied bandwidth are provided in correspondence with each output line in a line interface unit connected to a public network. In the packet transmission apparatus, scheduled transmission time of the head packet of each queue is calculated according to a bandwidth to be guaranteed and the head packet is read out from the queue at the scheduled transmission time.
However, the above-described prior arts do not disclose a practical traffic shaping technique enabling a packet transfer in the minimum guaranteed bandwidth or more while effectively using an unoccupied bandwidth with respect to variable-length packets communicated on the Internet in conformity with the minimum guaranteed bandwidth preliminarily contracted. For example, since the control objects are ATM cells having a fixed length, the prior arts 1 and 2 cannot be applied as they are to the traffic of variable-length packets.
The prior art 3 guarantees the minimum bandwidth of priority packets by reading out the head packet from the high priority queue to transmit it to the output line at the scheduled packet transmission time, and assigning new scheduled transmission time to the next packet in the same high priority queue so as to keep the minimum guaranteed bandwidth. When packets of a predetermined amount or more are stored in the high priority queue, the prior art 3 prevents overflow of the queue by setting scheduled transmission time, which becomes immediately packet transmission time, to the next packet irrespective of the minimum guaranteed bandwidth. The packets stored in the non-priority queue obtain the transmission right when the high priority queue has no packet to be transmitted at the scheduled transmission time. These non-priority packets are transmitted to the output line by using idle time of the minimum bandwidth.
In the prior art 3, since packets are read out from the high priority queue which reaches the scheduled transmission time assigned to the head packet or from the high priority queue which has passed the scheduled transmission time as a rule, it is theoretically difficult to effectively use the unoccupied bandwidth which becomes available before the transmission scheduled time. Although the prior art 3 describes that the transmission bandwidth can be increased to the maximum allowable bandwidth when the number of packet transmission users decreases, there is no disclosure on a concrete control technique.